home *** CD-ROM | disk | FTP | other *** search
/ Chip: 2001 Haziran / CHIP Haziran2001.iso / prog / haziran / 20 / setup.exe / {app} / plugins / XQ Show on Desktop 4.xpl < prev    next >
Encoding:
XSetup plugin  |  2001-03-28  |  3.0 KB  |  98 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="6"
  3. "COUNT"="1"
  4. "UIPATH"="Appearance\Desktop\Icons\Visible Icons"
  5. "NAME"="Internet Explorer Main Icon"
  6. "LANGUAGE"="VBScript"
  7. "TEXT 1"="Show "Internet Explorer" Icon on Desktop"
  8. "DESCRIPTION 1"="If you want to have the Internet Explorer icon on your Desktop, place a tick in the box above."
  9. "DESCRIPTION 2"="In order to activate the changes, it may be necessary to refresh the Desktop or to press the F5 Key."
  10. "DESCRIPTION 3"="Note: Showing the icon in Internet Explorer 4.x or 5.0x only effects the current user, whereas showing the icon in Internet Explorer 2.x, 3.x and 5.5x affects all users of this machine."
  11. "COMMENT 1"="Thanks to TeXHeX [TeXHeX@xteq.com] for some of the code."
  12. "VERSION"="3.18"
  13. "AUTHOR"="Neil R. Turner (totalxs@hotmail.com) for Xteq Systems"
  14. "CONTACTURL"="http://www.128moorlane.freeserve.co.uk/"
  15. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  16.  
  17. sIEV="HKLM\Software\Microsoft\Internet Explorer\Version"
  18. sIE2="HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{FBF23B42-E3F0-101B-8488-00AA003E56F8}"
  19. sIE4="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoInternetIcon"
  20. sIE5="HKCR\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\ShellFolder\Attributes"
  21.  
  22. SUB Plugin_Initialize
  23. ' Step 1: What version of IE are we using? Let's find out...
  24.  s=RegReadValue(sIEV)
  25.  
  26. ' Step 2: Disable if it is IE1
  27.  if s<"2" then
  28.   Call Disable()
  29.  end if
  30.  
  31. ' Step 3: Disable if it is IE6 or better
  32. ' (the show on desktop function changes every time, so this should be disabled until we support it)
  33.  if s>"6" then ' Unless IE6 is 6.00.00.00 then this is OK.
  34.   Call Disable()
  35.  end if
  36.  
  37. ' Step 4: Read Values
  38.  f=RegPathExists(sIE2)
  39.  if f=true then
  40.   Call SetUIElement(1,true)
  41.  end if
  42.  
  43.  i=RegReadValue(sIE4)
  44.  if IsEmpty(i) or i="00000000" then
  45.   Call SetUIElement(1,true)
  46.  end if
  47.  
  48.  i=RegReadValue(sIE5)
  49.  if i="36" then
  50.   Call SetUIElement(1,true)
  51.  end if
  52. END SUB
  53.  
  54. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  55.  ' Firstly, we need to make sure that the user can actually SEE the icon...
  56.  Call RegWriteValue("HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoInternetIcon",0,2)
  57.  
  58.  s=RegReadValue(sIEV)
  59.  if s<"4" then
  60.   b=GetUIElement(1)
  61.   ' Sorry TeX - I've stolen your code here...
  62.   if b=true then
  63.    Call RegWriteValue(sIE2 & "\@","",1)
  64.   else
  65.    if RegPathExists(sIE2) then
  66.     if RegValueExists(s & "\Removal Message") then
  67.      Call RegDeleteValue(s & "\Removal Message")
  68.     end if 
  69.     'finally delete the path 
  70.     Call RegDeletePath(s)
  71.    end if
  72.   end if
  73.  end if
  74.  
  75.  if s<"5.5" then
  76.   b=GetUIElement(1)
  77.   if b=true then
  78.    Call RegWriteValue(sIE4,"00000000",3)
  79.   else
  80.    Call RegWriteValue(sIE4,"01000000",3)  
  81.   end if
  82.  end if
  83.  
  84.  if s>"5.5" then
  85.   b=GetUIElement(1)
  86.   if b=true then
  87.    Call RegWriteValue(sIE5,"36",2)
  88.   else
  89.    Call RegWriteValue(sIE5,"1048612",2)  
  90.   end if
  91.  end if
  92.  
  93.  Call IndicateSettingChange()
  94. END SUB
  95.  
  96. SUB Plugin_Terminate
  97. END SUB
  98.